#pragma once
#ifndef LJFORCE_H_
#define LJFORCE_H_
#include "force.h"
#include<cmath>
/* @brief Lennard-Jones force field
 */
class LjForce : public Force
{
public:
    LjForce(const double &sigma, const double &epsilon)
    {
        this->sigma_ = sigma;
        this->epsilon_ = epsilon;
    }
    ~LjForce() {}
    void ComputeForce(MolSys &mol);

private:
    double sigma_;
    double epsilon_;

private:
    void LjTerms(const double &r, double &attractive_term, double &repulsive_term);
    double ForceFunc(const double &rsquare, const double &attractive_term, const double &repulsive_term);
    double PotentialFunc(const double &attractive_term, const double &repulsive_term);
    void Distance(const std::vector<double> &ri, const std::vector<double> &rj,
                  std::vector<double> &rij, double &r, double &r2);
};
#endif
